function ajax1(method,url,data,success,error){
	var xml = new XMLHttpRequest()||new ActiveXObject("Microsoft,XMLHTTP");
	//打开方式
	method = method.toUpperCase();
	xml.open(method,url);
	xml.setRequestHeader("Content-type","application/x-www-form-urlencoded");
	if(data){
		xml.send(data);
	}else{
		xml.send();
	}
	xml.onreadystatechange = function(){
		if(xml.readyState==4){
			if(xml.status==200){
				success(xml.responseText);
			}else{
				error(xml.status);
			}
		}
	}
}

function ajax(method,url,data,success,error){
	$.ajax({
		url:url,
		type:method,
		data:data,
		dataType:'json',
		success:function(data){
			success(data)
		},
		error:function(data){
			error(data)
		}
	})
};
$(".purple,.black,.lookup").on("click",function(event){
	event.stopPropagation();
});
function ShowTipBox(){
	var dIv=$("<div class='a-div'><h4 class='a-h4'>提示</h4><p class='a-p'>您确定要<span class='a-span'>删除</span>吗？</p><div class='a-btn'><input type='button' value='确认' class='a-confirm btn-primary'><input type='button' value='取消' class='a-cancel'></div></div>");
    $("body").append(dIv);
};
function ShowTextBox(){
	var dIv=$("<div class='b-div'><h4 class='b-h4'>提示</h4><p class='b-p'>请输入驳回信息</p><textarea class='b-text'></textarea><div class='b-btn'><input type='button' value='确认' class='b-confirm btn-primary'><input type='button' value='取消' class='b-cancel'></div></div>");
    $("body").append(dIv);
};
function ShowTipBoxEnd(){
    var dIv=$("<div class='a-div'><h4 class='a-h4'>提示</h4><p class='a-p'>您确定要<span class='a-span'>禁用</span>吗？</p><div class='a-btn'><input type='button' value='确认' class='a-confirm btn-primary'><input type='button' value='取消' class='a-cancel'></div></div>");
    $("body").append(dIv);
};
function randomNum(){
    return parseInt(100000000+Math.random()*100000000);
};

var navHeight=$('#sidebar').height(),
	contentHeight = $('#main-content').height();

if(navHeight > contentHeight)
{
	$('#main-content').height(navHeight);
}
